namespace AdmissionQA.Application.Common;

public class Result<T>(int code, string msg, T? date)
{
    public int Code { get; set; } = code;
    public string Msg { get; set; } = msg;
    public T? Data { get; set; } = date;

    public static Result<T> Success(T? data, string msg = "操作成功") => new(1000, msg, data);

    public static Result<T> Fail(string msg = "操作失败") => new(1004, msg, default);
}
